<?php
declare (strict_types=1);

namespace app\api\exception;

use Exception;
use think\exception\HttpException;

/**
 * | Notes：重构Http状态类
 * +----------------------------------------------------------------------
 * | PHP Version 7.2+
 * +----------------------------------------------------------------------
 * | Copyright (c) 2011-2020 https://www.xxq.com.cn, All rights reserved.
 * +----------------------------------------------------------------------
 * | Author: 和好 <389123492@qq.com>
 * +----------------------------------------------------------------------
 * | Date: 2020/4/18 21:49
 * +----------------------------------------------------------------------
 */
class HttpExceptionHandle extends HttpException
{
    /**
     * HttpExceptionHandle constructor.
     *
     * @param array          $apiErrorConst
     * @param Exception|null $previous
     * @param array          $headers
     */
    public function __construct(array $apiErrorConst, Exception $previous = null, array $headers = [])
    {
        parent::__construct($apiErrorConst[2], $apiErrorConst[1], $previous, $headers, $apiErrorConst[0]);
    }
}